package ch.janotta.slawo.ultraquest.utilities;

public final class ArticleGenerator {
  public static String getIndefiniteArticle(String noun) {
    if (noun == null) {
      return "a";
    }

    char firstChar = noun.toUpperCase().charAt(0);
    if (firstChar == 'A' || firstChar == 'E' || firstChar == 'i' || firstChar == 'O' || firstChar == 'U') {
      return "an";
    } else {
      return "a";
    }
  }
}
